CC=g++
CFLAGS=-W -Wall
LDFLAGS= -lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_TTF -lopengl32 -lfmodex -lglu32 -static-libgcc -static-libstdc++
EXEC=echecs
SRC= $(wildcard *.cpp)
OBJ= $(SRC:.cpp=.o)

all: $(EXEC)

echecs: $(OBJ)
	@$(CC) -o $@ $^ $(LDFLAGS)

%.o: %.c
	@$(CC) -o $@ -c $< $(CFLAGS)

.PHONY: clean mrproper

clean:
	@rm -rf *.o *.exe

mrproper: clean
	@rm -rf $(EXEC)
